using IcsSEMCtrl.Util;
using System;
namespace IcsSEMCtrl.Global.Device
{
	public class CarrierProhibit
	{
		public const int _SET = 0;
		public const int _RESET = 1;
		private int _value;
		private static int _size;
		private static CarrierProhibit[] _array;
		public static string[] displayStrings;
		public static CarrierProhibit[] displayValues;
		public static CarrierProhibit SET;
		public static CarrierProhibit RESET;
		public static CarrierProhibit IT_ENUM_MAX;
		static CarrierProhibit()
		{
			CarrierProhibit._size = 2;
			CarrierProhibit._array = new CarrierProhibit[CarrierProhibit._size];
			CarrierProhibit.displayStrings = new string[CarrierProhibit._size];
			CarrierProhibit.displayValues = new CarrierProhibit[CarrierProhibit._size];
			CarrierProhibit.SET = new CarrierProhibit(0);
			CarrierProhibit.RESET = new CarrierProhibit(1);
			CarrierProhibit.IT_ENUM_MAX = new CarrierProhibit(2147483647);
			CarrierProhibit.displayStrings[0] = "SET";
			CarrierProhibit.displayStrings[1] = "RESET";
			CarrierProhibit.displayValues[0] = CarrierProhibit.SET;
			CarrierProhibit.displayValues[1] = CarrierProhibit.RESET;
		}
		public static string ValueToString(CarrierProhibit val)
		{
			string result;
			switch (val.Value())
			{
			case 0:
				result = CarrierProhibit.displayStrings[0];
				break;
			case 1:
				result = CarrierProhibit.displayStrings[1];
				break;
			default:
				result = "";
				break;
			}
			return result;
		}
		public static CarrierProhibit StringToValue(string val)
		{
			CarrierProhibit result;
			if (Helper.IsNullOrEmpty(val))
			{
				result = CarrierProhibit.IT_ENUM_MAX;
			}
			else
			{
				for (int i = 0; i < CarrierProhibit.displayStrings.Length; i++)
				{
					if (val.Equals(CarrierProhibit.displayStrings[i]))
					{
						result = CarrierProhibit.displayValues[i];
						return result;
					}
				}
				result = null;
			}
			return result;
		}
		public int Value()
		{
			return this._value;
		}
		public static CarrierProhibit From_Int(int value)
		{
			CarrierProhibit result;
			if (value >= 1 && value < CarrierProhibit._size)
			{
				result = CarrierProhibit._array[value];
			}
			else
			{
				result = CarrierProhibit.IT_ENUM_MAX;
			}
			return result;
		}
		protected CarrierProhibit(int value)
		{
			this._value = value;
			if (value >= 1 && value < CarrierProhibit._size)
			{
				CarrierProhibit._array[this._value] = this;
			}
		}
		public bool Equals(CarrierProhibit otherEnum)
		{
			return otherEnum.Value() == this._value;
		}
		public override string ToString()
		{
			return CarrierProhibit.displayStrings[this._value];
		}
	}
}
